﻿using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace HCQ2_Model.WeiXinApiModel.Model
{
    public class ChartRegisterModel: ChartCode
    {
        /// <summary>
        ///  登录名
        /// </summary>
        //[Required(ErrorMessage = "LoginName：登录名必传项！")]
        public string LoginName { get; set; }
        /// <summary>
        ///  昵称（用户名）
        /// </summary>
        public string UserName { get; set; }
        /// <summary>
        ///  登录密码
        /// </summary>
        //[Required(ErrorMessage = "PWD：登录密码必传项！")]
        public string PWD { get; set; }
        /// <summary>
        ///  推荐人id
        /// </summary>
        public int refUserId { get; set; }
        /// <summary>
        ///  微信头像（微信头像地址）
        /// </summary>
        public string UserImage { get; set; }
        /// <summary>
        ///  手机号码
        /// </summary>
        public string UserPhone { get; set; }
    }
    public class ChartCode
    {
        /// <summary>
        ///  临时登录凭证
        /// </summary>
        [Required(ErrorMessage = "code：临时登录凭证code必传项！")]
        public string code { get; set; }
        /// <summary>
        ///  appid
        /// </summary>
        public string appid { get; set; }
    }
    /// <summary>
    ///  微信openid模型
    /// </summary>
    public class ChartUser
    {
        /// <summary>
        ///  微信id,唯一
        /// </summary>
        public string openid { get; set; }
        /// <summary>
        ///  接口凭证
        /// </summary>
        public string session_key { get; set; }
    }
    /// <summary>
    ///  微信用户信息模型
    /// </summary>
    public class WebChartUser
    {
        /// <summary>
        ///  微信id,唯一
        /// </summary>
        public string openid { get; set; }
        /// <summary>
        ///  昵称
        /// </summary>
        public string nickname { get; set; }
        /// <summary>
        ///  手机号
        /// </summary>
        public string purePhoneNumber { get; set; }
        /// <summary>
        ///  性别
        ///  1时是男性，值为2时是女性，值为0时是未知
        /// </summary>
        public int sex { get; set; }
        /// <summary>
        ///  城市
        /// </summary>
        public string city { get; set; }
        /// <summary>
        ///  省份
        /// </summary>
        public string province { get; set; }
        /// <summary>
        ///  国家
        /// </summary>
        public string country { get; set; }
        /// <summary>
        ///  头像地址
        /// </summary>
        public string headimgurl { get; set; }
    }
    /// <summary>
    ///  微信绑定模型
    /// </summary>
    public class ChartBound: ChartCode
    {
        /// <summary>
        ///  用户后台唯一标记
        /// </summary>
        [Required(ErrorMessage = "userid：用户后台唯一标记必传项！")]
        public string userid { get; set; }
    }
    public class UserModel: ChartCode
    {
        /// <summary>
        ///  用户后台唯一标记
        /// </summary>
        [Required(ErrorMessage = "userid：用户后台唯一标记必传项！")]
        public string userid { get; set; }
    }
    public class ChartPWD: ChartCode
    {
        [Required(ErrorMessage = "password：密码字段必填项！")]
        public string pass_word { get; set; }
        [Required(ErrorMessage = "login_name：登录名字段必填项！")]
        public string login_name { get; set; }
    }
}
